package pc15;

import java.util.Scanner;

public class J10Account {

	public static void main(String[] args) {
		int aid, balance, withDraw, deposit;
		double interestRate, monthlyInterestRate;
		String dateCreated, result ="";
		Scanner sc = new Scanner(System.in);
		
		System.out.print("계좌번호: "); aid=sc.nextInt();
		System.out.print("잔액: "); balance=sc.nextInt();
		System.out.print("연 이자율: "); interestRate=sc.nextDouble();
		System.out.print("통장개설일[2014/02/20]: "); dateCreated=sc.next();
		System.out.print("입금액: "); deposit=sc.nextInt();
		System.out.print("출금액: "); withDraw=sc.nextInt();
		
		monthlyInterestRate=getMonthlyInterestRate(interestRate);
		balance=getDeposit(balance,deposit);
		balance=getWithDraw(balance,withDraw);
		
		result += "=========개설계좌 "+aid+"의 정보 ==========\n";
		result += "월이율: "+monthlyInterestRate+",잔액: "+balance+",개설일: "+dateCreated;
		System.out.println(result);
		sc.close();
		
	}//main

	private static double getMonthlyInterestRate(double interestRate) {
		return (interestRate/12);
	}

	private static int getDeposit(int balance, int deposit) {
		return (balance+deposit);
	}

	private static int getWithDraw(int balance, int withDraw) {
		return (balance-withDraw);
	}
}//class
